home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / kiss-0.11 / kiss-0 / kiss / src / dohelp.c < prev    next >
C/C++ Source or Header  |  1995-04-12  |  3KB  |  67 lines

  1. #include "kiss.h"
  2.  
  3. int dohelp (Stringstack s)
  4. {
  5.     if (s.nstr > 1)
  6.     printf ("Context-sensitive help not present, just run the command "
  7.                     "that you need help\n"
  8.         "about with the \"-h\" flag. Most commands will then show "
  9.                     "info.\n");
  10.  
  11.     printf ("Relevant environment, only maintained with absence of -E flag:\n"
  12.         "          HOME - home directory\n"
  13.         "           PWD - current working directory\n"
  14.         "         SHELL - this shell interpreter\n"
  15.         "         SHLVL - shell level, initially 1\n"
  16.         "           TTY - name of ttyfile in interactive processes\n"
  17.         "           UID - numerical user ID\n"
  18.         "          USER - user name\n"
  19.         "Inspected environment:\n"
  20.         "        PROMPT - interactive prompt, use:\n"
  21.         "                 %%p for current dir, %%u for username, %%n for\n"
  22.         "                 newline, other chars: literally; default: "
  23.                             "[%%u] %%p >\n"
  24.         "Startup files, auto-loaded when in interactive mode:\n"
  25.         "  /etc/kiss.rc - system-wide startup file\n"
  26.         " $HOME/kiss.rc - user-owned statup file\n"
  27.         "Built-in commands (commands with * can't be re-aliased):\n"
  28.         "             ! - recall a command from history list\n"
  29.         "         alias - define an alias or list aliases (*)\n"
  30.         "           cat - copy a file to stdout\n"
  31.         "            cd - change working directory (*)\n"
  32.         "         chgrp - change group id in file ownership\n"
  33.         "         chmod - change modebits in file ownership\n"
  34.         "         chown - change user id in file ownership\n"
  35.         "            cp - copy file(s), including 'holes'\n"
  36.         "          exec - execute program in place of %s (*)\n"
  37.         "          exit - terminate %s (*)\n"
  38.         "          grep - grep for strings in files\n"
  39.         "          help - this text\n"
  40.         "       history - show history of entered commands\n"
  41.         "          kill - kill or signal processes\n"
  42.         "            ln - create a hard or symbolic link\n"
  43.         "            ls - directory listing\n"
  44.         "         mkdir - make directories\n"
  45.         "         mknod - make pipe or character or block device\n"
  46.         "          more - show a file pagewise\n"
  47.         "         mount - mount a filesystem\n"
  48.         "            mv - rename files\n"
  49.         "      printenv - print environment table\n"
  50.         "           pwd - print working directory\n"
  51.         "          read - read value of a variable from stdin (*)\n"
  52.         "            rm - remove files or directories\n"
  53.         "         rmdir - remove empty directories\n"
  54.         "        setenv - set environment variable (also VAR=value) (*)\n"
  55.         "         sleep - wait some seconds\n"
  56.         "        source - read commands from file (*)\n"
  57.         "         touch - reset file's timestamp\n"
  58.         "        umount - unmount a filesystem\n"
  59.         "      unsetenv - remove a variable from the environment "
  60.                 "(also VAR=) (*)\n"
  61.         "           ver  - print version number\n"
  62.         "            wc  - count lines, words, chars in files\n"
  63.         "         where  - where does a program reside on the PATH\n"
  64.        , progname, progname);
  65.     return (0);
  66. }
  67.